/**
 *  后台管理员接口
 */
import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/adinfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function getmodule(data) {
  return request({
    url: '/auth/modshow',
    method: 'get',
    params: data
  })
}

export function addModule(data) {
  return request({
    url: '/auth/cremod',
    method: 'post',
    data: data
  })
}

export function editModule(data) {
  return request({
    url: '/auth/edtmod',
    method: 'post',
    data: data
  })
}

export function getnav(data) {
  return request({
    url: '/auth/navshow',
    method: 'get',
    params: data
  })
}

export function addNav(data) {
  return request({
    url: '/auth/crenav',
    method: 'post',
    data: data
  })
}

export function editNav(data) {
  return request({
    url: '/auth/edtnav',
    method: 'post',
    data: data
  })
}

export function getpow(data) {
  return request({
    url: '/auth/powshow',
    method: 'get',
    params: data
  })
}

export function addPow(data) {
  return request({
    url: '/auth/crepow',
    method: 'post',
    data: data
  })
}

export function editPow(data) {
  return request({
    url: '/auth/edtpow',
    method: 'post',
    data: data
  })
}

